package com.usian.article.controller;

import com.usian.apis.article.ApArticleCollectionApi;
import com.usian.article.service.ApCollectionService;
import com.usian.model.article.dtos.CollectionBehaviorDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/v1/collection_behavior")
public class ApCollectionController implements ApArticleCollectionApi {
    @Autowired
    private ApCollectionService apCollectionService;

    /**
     * 文章收藏
     * @param dto
     * @return
     */
    @PostMapping
    public ResponseResult collections(@RequestBody CollectionBehaviorDto dto){
        return apCollectionService.collections(dto);
    }
}
